<div class="layui-fluid layui-anim febs-anim" id="febs-dept" lay-title="部门管理">
    <div class="layui-row layui-col-space8 febs-container">
        <div class="layui-col-md12 layui-col-sm12 layui-col-xs12">
            <div class="layui-card">
                <div class="layui-row">
                    <div class="layui-col-md8 layui-col-sm9 layui-col-xs9">
                        <div class="layui-form-item" style="margin-top: 20px">
                            <div class="layui-inline">
                                <label class="layui-form-label layui-form-label-sm">科室名称</label>
                                <div class="layui-input-inline">
                                    <input type="text" name="deptName" autocomplete="off" class="layui-input">
                                </div>
                            </div>
                            <button type="button" class="layui-btn layui-btn-radius">流体按钮（最大化适应）</button>
                        </div>
                    </div>
                </div>
                <table id="demo" lay-filter="test"></table>
            </div>
        </div>
    </div>

</div>
<script data-th-inline="javascript" type="text/javascript">

    layui.use('table', function(){
        var table = layui.table;

        //第一个实例
        table.render({
            elem: '#demo'
            ,height: 312
            ,url: ctx + 'web/get/deptlist' //数据接口
            ,page: true //开启分页
            ,cols: [[ //表头
                {field: 'id', title: 'ID', width:80, sort: true, fixed: 'left'}
                ,{field: 'name', title: '科室名称', width:200}
                ,{field: 'intro', title: '科室介绍', width:220}
            ]]
            ,response: {
                statusName: "code",
                statusCode: 200,
                dataName: "data"
            }
    });

        table.render({
            cols:  [[ //标题栏
                {checkbox: true}
                ,{field: 'id', title: 'ID', width: 80}
                // ,{field: 'username', title: '用户名', width: 120}
            ]]
        });

    });

</script>